package com.industrial.im.utils;


import com.industrial.im.factory.SmsSendFactory;
import com.industrial.im.service.SmsSenderService;
import com.industrial.im.vo.SendSmsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import java.util.Map;

@Component
public class SmsSendUtils {

    @Autowired
    private SmsSendFactory smsSendFactory;

    @Async
    public void sendSms(Map map, SendSmsVo vo) {
        SmsSenderService smsSend = smsSendFactory.getSmsSend();
        smsSend.send(map,vo);
    }
}
